<template lang="">
    <div class="C">
        <button @click="emitD">派发一个事件给D</button>
    </div>
</template>
<script lang="ts" setup>
import Bus from '../Bus'
// const emit = defineEmits(['on-click'])
let flag = false

const emitD = ()=>{
    flag = !flag
    // emit('on-click',flag)
    Bus.emit('on-click',flag)
}

</script>

<style lang="less">
  .C{
    width:200px;
    height:200px;
    background: blue;
    color: aliceblue;
  }  
</style>